//package com.baidu.yyb.actiivitys;
//
//
//import android.os.Bundle;
//import android.view.View;
//import android.widget.Button;
//
//import androidx.appcompat.app.AppCompatActivity;
//import androidx.recyclerview.widget.RecyclerView;
//
//import com.baidu.yyb.R;
//
//import java.util.ArrayList;
//
//public class Activity_search extends AppCompatActivity {
//    private SearchView mSv;
//    private RecyclerView mRc;
//    private Button mRet;
//    private Intent_Activity intent_activity;
//    private ArrayList<NotesClassData> NoteAryList;
//    private DateDealWith dateDealWith;
//    private Boolean IsNull = true;
//    private recycleViewShow RecShow;
//    private long LastTouchTime;
//
//    private boolean isDouble() {
//        long FirstTouchTime = System.currentTimeMillis();
//        if (Math.abs(FirstTouchTime - LastTouchTime) < 500) {
//            return true;
//        }
//        LastTouchTime = FirstTouchTime;
//        return false;
//    }
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_seach);
//        NoteAryList = new ArrayList<>();
//        NoteAryList.clear();
//        initView();
//        MySetOnClick();
//        DealWithView();
//    }
//
//    private void DealWithView() {
//        mSv.setSubmitButtonEnabled(true);
//
//    }
//
//    private void MySetOnClick() {
//        MyOnClick myOnClick = new MyOnClick();
//        MySearchView mySearchView = new MySearchView();
//        mRet.setOnClickListener(myOnClick);
//        mSv.setOnQueryTextListener(mySearchView);
//    }
//
//    private void initView() {
//        mRet = findViewById(R.id.return_btn);//return
//        mRc = findViewById(R.id.searchRV);//Recycle
//        mSv = findViewById(R.id.search_btn);//SearchView
//        mSv.requestFocus();
//    }
//
//    private class MyOnClick implements View.OnClickListener {
//        @Override
//        public void onClick(View v) {
//            switch (v.getId()) {
//                case R.id.return_btn:
//                    if (!isDouble()) {
//                        intent_activity = new Intent_Activity(false, Activity_search.this, StringName.ACTIVITY_MAIN);
//                        intent_activity.Go_Intent();
//                    }
//                    break;
//            }
//        }
//    }
//
//    private class MySearchView implements SearchView.OnQueryTextListener {
//
//        @Override
//        public boolean onQueryTextSubmit(String query) {
//            NoteAryList.clear();
//            dateDealWith = new DateDealWith(Activity_search.this, String.valueOf(query));
//            dateDealWith.GetSearchData();
//            IsNull = dateDealWith.DateIsNull();
//            NoteAryList = dateDealWith.DateArrayList();
//            RecShow = new recycleViewShow(Activity_search.this, mRc, IsNull, NoteAryList, 1);
//            RecShow.SearchViewShow();
//            return false;
//        }
//
//        @Override
//        public boolean onQueryTextChange(String newText) {
//            NoteAryList.clear();
//            dateDealWith = new DateDealWith(Activity_search.this, String.valueOf(newText));
//            dateDealWith.GetSearchData();
//            IsNull = dateDealWith.DateIsNull();
//            NoteAryList = dateDealWith.DateArrayList();
//            RecShow = new recycleViewShow(Activity_search.this, mRc, IsNull, NoteAryList, 1);
//            RecShow.SearchViewShow();
//            return false;
//        }
//    }
//
//}